<?php
	/* Behind */
	FunctionsHelper::saveCurrentPageInSession($PageName);

	FunctionsHelper::includeFiles(
		array(
			PUBLIC_CONTROLLERS_DIRECTORY . 'news.php',
			PUBLIC_CONTROLLERS_DIRECTORY . 'surveys.php',
			PUBLIC_CONTROLLERS_DIRECTORY . 'players.php'
		)
	);

	$NewsC = new NewsC();
	$Surveys = new Surveys();
	$Players = new Players();

	$MainNews = $NewsC->getTopNews();
	$SecondaryNews = $NewsC->getOlderNews();

	$Survey = $Surveys->getActive();
	$SurveyId = $Survey->getId();

	$UserVoted = 0;
	if (empty($SurveyId)){
		$NoSurveyOpened = 1;
		$Survey = $Surveys->getLast();
	}else{
		$NoSurveyOpened = 0;
		if ($Survey->userHasVoted($_SERVER["REMOTE_ADDR"]))
			$UserVoted = 1;
	}
	$arrArgentinianPlayers = $Players->GetTopTen("Argentina");
	$arrMalePlayers = $Players->GetTopTen("", "M");
	$arrFemalePlayers = $Players->GetTopTen("", "F");
?>